package com.jiwei.system.pojo;

import com.jiwei.system.vo.Login;

import java.util.Objects;

/**
 * @title: MemberLogin
 * @Author 赖志宇
 * @Description 
 * @Date: 2020/8/18
 * @Version 1.0
 */
public class MemberLogin implements POJO<Login> {

    private String account;

    private String passwordMD5;

    private String role;

    public MemberLogin() {
    }

    public MemberLogin(String account, String passwordMD5, String role) {
        this.account = account;
        this.passwordMD5 = passwordMD5;
        this.role = role;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPasswordMD5() {
        return passwordMD5;
    }

    public void setPasswordMD5(String passwordMD5) {
        this.passwordMD5 = passwordMD5;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof MemberLogin)) return false;
        MemberLogin that = (MemberLogin) o;
        return getAccount().equals(that.getAccount()) &&
                getPasswordMD5().equals(that.getPasswordMD5());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getAccount(), getPasswordMD5());
    }

    @Override
    public String toString() {
        return "MemberLogin{" +
                "account='" + account + '\'' +
                ", passwordMD5='" + passwordMD5 + '\'' +
                ", role='" + role + '\'' +
                '}';
    }

    @Override
    public Login changeToVO() {
        return null;
    }
}
